﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Adultorama.Gui
{
    public partial class AdminMenuPanel : UserControl
    {
        Adultorama parent;
        public AdminMenuPanel(Adultorama parent)
        {
            InitializeComponent();
            this.parent = parent;
        }

        private void button_Click(object sender, EventArgs e)
        {
            hidePanels();
            if (sender.Equals(setupLabel))
            {
                this.setupLabel.ForeColor = Color.Red;
                parent.setupPanel.Visible = true;

            } if (sender.Equals(createMovieLabel))
            {
                this.createMovieLabel.ForeColor = Color.Red;
                parent.createMoviePanel.Visible = true;

            } if (sender.Equals(createShowLabel))
            {
                this.createShowLabel.ForeColor = Color.Red;
                parent.createShowPanel.Visible = true;

            } if (sender.Equals(statementLabel))
            {
                this.statementLabel.ForeColor = Color.Red;

            } if (sender.Equals(logOutLabel)) {
                this.Visible = false;
                parent.logInPanel.Visible = true;

            }
        }
        private void hidePanels()
        {
            this.setupLabel.ForeColor = Color.Black;
            parent.setupPanel.Visible = false;
            this.createMovieLabel.ForeColor = Color.Black;
            parent.createMoviePanel.Visible = false;
            this.createShowLabel.ForeColor = Color.Black;
            parent.createShowPanel.Visible = false;
        }
    }
}
